<!--智慧消防V1.0-info页面-->
<template>
    <div class="app-container">
        <el-row :gutter="10">
            <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
                <div style="text-align: center;margin-bottom: 30px">
                    设备巡检详情信息
                </div>
                <el-form :model="inspectionInfo" ref="inspectionInfo"  label-width="150px">
                        <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
                            <el-form-item label="设备名称" prop="equipmentName">
                                {{inspectionInfo.equipmentName}}
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
                            <el-form-item label="所属主体"  prop="enterpriseName">
                                {{inspectionInfo.enterpriseName}}
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
                            <el-form-item label="巡检人员 " prop="inspectionUserName">
                                {{inspectionInfo.inspectionUserName}}
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
                            <el-form-item label="设备状态" prop="equipmentStatus">
                                {{inspectionInfo.equipmentStatus  | infoStatus}}
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
                            <el-form-item label="巡检描述" prop="inspectionRemark">
                                {{inspectionInfo.inspectionRemark }}
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
                            <el-form-item label="处理意见" prop="disposalOpinions">
                                {{inspectionInfo.disposalOpinions}}
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
                            <el-form-item label="巡检状态" prop="inspectionStatus">
                                {{inspectionInfo.inspectionStatus==0?"需要维修":"不需要维修"}}
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
                            <el-form-item label="巡检描述" prop="inspectionRemark">
                                {{inspectionInfo.inspectionRemark  }}
                            </el-form-item>
                        </el-col>


                </el-form>
            </el-col>
        </el-row>


    </div>

</template>

<script>
import {getInspectionVo} from "@/api/equipment";

export default {
    name: "inspectionInfo",
    data(){
        return{
            inspectionInfo:{},


        }
    },
    created() {
        this.getInspectionVo()
    },
    methods:{
        getInspectionVo(){
            getInspectionVo({ucId:this.$route.params.ucId}).then(res=>{
                this.inspectionInfo = res.data
                this.$notify.success({
                    title: '成功',
                    message: "获取设备信息成功"
                })
            }).catch(error=>{
                this.$notify.error({
                    title: '失败',
                    message: error.message
                })
            })
        }
    },
    filters:{
        infoStatus(val){
            let status = "";
            switch (val){
                case 0:
                    status = "正常";
                    break;
                case 1:
                    status = "停机";
                    break;
                case 2:
                    status = "损坏";
                    break;
                default:
                    break;
            }
            return status;
        }
    }

}
</script>
<style>
.avatar-uploader-icon {
    font-size: 28px;
    color: #8c939d;
    width: 149px;
    height: 149px;
    line-height: 149px;
    text-align: center;
}
.avatar {
    width: 149px;
    height: 149px;
    display: block;
    margin: 0 auto; /*水平居中*/
}
</style>
